define(['plugins/router'], function (router) {
  return {
    router: router,
    activate: function () {
      router.map([
        { route: ['', 'home'], title: '主页', moduleId: 'home/home', nav: 1 },
        { route: 'events', title: '事件', moduleId: 'events/index', nav: 2 },
        { route: 'modal', title: '对话框', moduleId: 'modal/index', nav: true },
        { route: 'viewComposition', title: '视图组合', moduleId: 'viewComposition/index', nav: true },
        { route: 'masterDetail', title: '项目详情(子项激活和停止) ', moduleId: 'masterDetail/index', nav: true },
        { route: 'keyedMasterDetail/:resourceId*details', moduleId: 'keyedMasterDetail/master', title: '值项目详情', hash: '#keyedMasterDetail/:resourceId'},
        { route: 'widgets-expander-usage', moduleId: 'widgets-expander-usage/index', title: '展开插件使用例子', nav: true },
        { route: 'knockout-samples*details', moduleId: 'ko/index', title: 'Knockout 示例', nav: true },
      ]).buildNavigationModel().mapUnknownRoutes('home/home', 'not-found')
      return router.activate();
    }
  }
})